<?php


namespace App\Events;
use App\Models\Order;

/**
 * 支付成功事件
 * Class OrderPaySuccess
 * @package App\Events
 */
class OrderPaySuccess
{
    public $order;
    public $attach;
    public $payType;

    /**
     * OrderPaySuccess constructor.
     * @param Order $order
     * @param $attach
     * @param $payType
     * @throws \Exception
     */
    public function __construct(Order $order, $attach, $payType)
    {
        if (!$order) {
            exception('订单不存在');
        }
        $this->order = $order;
        $this->attach = strtolower($attach);
        $this->payType = $payType;
    }
}